package com.sfh.service.model;

import com.jfinal.plugin.activerecord.Model;
import com.sfh.service.model.table.IdsTable;

public class IdsModel extends Model<IdsModel> {

	private static final long serialVersionUID = 9186859144843305722L;
	
	public static  long getId() {
		IdsModel model = new IdsModel();
		if (model.save()) {
			return model.getLong(IdsTable.id.toString());
		}
		String time = String.valueOf(System.currentTimeMillis()).substring(3);
		return Long.valueOf(time);
	}
}
